/*    */ package com.engine;
/*    */ 
/*    */ import java.text.DecimalFormat;
/*    */ import java.util.Calendar;
/*    */ 
/*    */ public class TimeManagement
/*    */ {
/*    */   public Calendar startTime;
/*    */   public Calendar serviceTime;
/*    */   public Calendar endTime;
/*    */ 
/*    */   public String getInterval(Calendar dt1, Calendar dt2)
/*    */   {
/* 13 */     long milliseconds1 = dt1.getTimeInMillis();
/* 14 */     long milliseconds2 = dt2.getTimeInMillis();
/* 15 */     long diff = milliseconds2 - milliseconds1;
/* 16 */     long diffSeconds = diff / 1000L;
/* 17 */     long diffMinutes = diff / 60000L;
/* 18 */     long diffHours = diff / 3600000L;
/*    */ 
/* 20 */     DecimalFormat d = new DecimalFormat("00");
/* 21 */     return d.format(diffHours) + ":" + d.format(diffMinutes) + ":" + d.format(diffSeconds);
/*    */   }
/*    */ }

/* Location:           F:\16 2\SQ.jar
 * Qualified Name:     com.engine.TimeManagement
 * JD-Core Version:    0.6.0
 */